package com.lening.community.controller;


import com.lening.community.service.impl.WorkbenchImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * @ToDo:
 * @Author：李成祥
 * @date: 2024/6/20 19:06
 */
@RestController
@RequestMapping("/workbench")
public class WorkbenchController {

//    @Resource
//    private IWorkbench workbench;
//    @GetMapping("getWorkbenchDat")
//    public Map<String,Object> getWorkbenchDat() throws ExecutionException, InterruptedException{
//        return workbench.getWorkbenchData();
//    }

    @Resource
    private WorkbenchImpl workbench;




    @GetMapping("/getWorkbenchDat")
    public Map<String,Object> getWorkbenchDat() throws ExecutionException, InterruptedException{
        return workbench.getWorkbenchData();
    }

    @GetMapping("getAll")
    public Map getAll(){
        return workbench.getAll();
    }
}
